package com.feng.leetcode;

/**
 * @author feng
 * @decrition
 * @date 2022/11/190:01
 */
public class L1732 {
    public static int largestAltitude(int[] gain) {
        int max = 0;
        int start = 0;
        for (int i = 0; i < gain.length; i++) {
            start += gain[i];
            max = Math.max(max, start);
        }
        return max;
    }

    public static void main(String[] args) {

    }
}
